﻿using System.Collections.Generic;
using DtoModels;
using Entities;
using IBasicsDal;
using SqlSugar;

namespace Bll
{
    public class SysUserBll
    {
        private readonly ISysUserDal _sysUserDal;

        public SysUserBll(ISysUserDal sysUserDal)
        {
            _sysUserDal = sysUserDal;
        }

        /// <summary>
        /// 分页加载所有用户信息
        /// </summary>
        /// <param name="userInfoReq"></param>
        /// <param name="totalCount"></param>
        public List<LoadAllUserResDto> LoadAllUser(UserInfoReqDto userInfoReq, ref int totalCount)
        {
            
            var queryResult = this._sysUserDal.LoadAllUser(userInfoReq.Page,userInfoReq.Limit, ref totalCount);

            return queryResult;
        }

    }
}